package com.designPattern.SinglePrinciple;


/**
 * @author zsj
 * @date 2023/5/11 16:21
 * <p>
 * 单一设计原则
 */
public class SingleResponsibility {

    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();



    }
}

class Vehicle {
    public void RoadRun(String vehicle) {
        System.out.println(vehicle + "在地上跑");
    }

    public void AirRun(String vehicle) {
        System.out.println(vehicle + "在空中跑");
    }

    public void WaterRun(String vehicle) {
        System.out.println(vehicle + "在水里跑");
    }
}
